package cn.yangliu.nacos.gateway.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

import lombok.Data;

/**
 * The type of nacos.
 *
 * @author 问道于盲
 * @date 2020 -01-01
 */
@Entity
@Table(name = "oauth2_role_authority")
@Data
public class Oauth2ClientRole2Authority {

    /**
     * current class instance's member.
     * The Id.
     */
    @EmbeddedId
    private Oauth2ClientRole2AuthorityKey id;

    /**
     * The interface Oauth 2 client role 2 authority key.
     *
     * @author 问道于盲
     */
    @Embeddable
    @Data
    public static class Oauth2ClientRole2AuthorityKey implements Serializable {

        /**
         * current class's static member
         * The constant serialVersionUID.
         */
        private static final long serialVersionUID = -2099735588389204622L;

        /**
         * current class instance's member.
         * The Role id.
         */
        @Column(name = "role_id")
        private Long roleId;

        /**
         * current class instance's member.
         * The Authority id.
         */
        @Column(name = "authority_id")
        private Long authorityId;
    }
}
